import React from 'react';
import './Loading.css';

const Loading = ({
    text = 'loading',
    color1 = '#354952',
    color2 = '#df1a54',
    textColor = '#fff'
}) => (
    <div className="cssloader">
        <div
            className="sh1"
            style={{ borderColor: `${color1} transparent transparent transparent` }}
        />
        <div
            className="sh2"
            style={{ borderColor: `transparent transparent ${color2} transparent` }}
        />
        <h4 className="lt" style={{ color: textColor }}>
            {text}
        </h4>
    </div>
);

export default React.memo(Loading);
